package com.lizi.idgenerator.service;

import com.lizi.idgenerator.dto.ResultModel;
import com.lizi.idgenerator.entity.CodeCreator;
import com.lizi.idgenerator.entity.IdCreator;

import java.util.List;

/**
* 编码生成器 
* @return 
* @author kingman
* @since 2020/12/23
*/
public interface CodeCreatorService {


    /**
     * 创建编码
     * @param codes
     * @return
     * @author kingman
     */
    void addCodes(List<String> codes);

    /**
     * 通过业务Id查询
     * @param businessId
     * @return
     * @author kingman
     */
    CodeCreator getByBusinessId(String businessId);

    /**
     * 生成编码
     * @param businessId
     * @return
     * @author kingman
     */
    ResultModel<List<String>> generateCode(String businessId);

}
